package main

import (
	"log"

	"voiddme.io/engineering/pkg/voiddme"
	http2 "voiddme.io/engineering/pkg/voiddme/transport/http"
)

func newApp(logger *log.Logger, server *http2.Server) *voiddme.App {
	return voiddme.New(
		voiddme.Logger(logger),
		voiddme.Server(server),
	)
}

func main() {
	app, cleanup, err := initApp(nil, nil, log.Default())
	if err != nil {
		panic(err)
	}
	defer cleanup()
	if err := app.Run(); err != nil {
		panic(err)
	}
}
